/*
	This file is part of Sandbox.

	Copyright (C) 2008  Marleine Daoud <marleine@gmail.com>

	Sandbox is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	Sandbox is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License 
	along with Sandbox.  If not, see <http://www.gnu.org/licenses/>.
*/

#import "search-by-fillcolor.h"

@implementation SearchByFillColorUI 

-init {
	if (self = [super init])
	{
		//fillcolorcheckbutton = [[CheckButton alloc] init];
		fillcolorlabel = [[[Label alloc] init] 
			text: "Fill Color:"];
		minusFill = [[[[Button alloc] init] label: "-"] stock: NO];
		fillcolorbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 165] 
			//  packStart: fillcolorcheckbutton]
			  packStart: fillcolorlabel: NO: NO: 5]
			  packStart: minusFill];
		
		fillcolorRlabel = [[[Label alloc] init] 
			text: "Fill Color R:"];
		fillcolorGlabel = [[[Label alloc] init] 
			text: "Fill Color G:"];
		fillcolorBlabel = [[[Label alloc] init] 
			text: "Fill Color B:"];
		fillcolorAlabel = [[[Label alloc] init] 
			text: "Fill Color A:"];
		fillcolorRspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		fillcolorGspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		fillcolorBspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		fillcolorAspin = [[[[SpinButton alloc] init] 
			range: 0: 255] step: 1: 5];
		fillcolorRbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: fillcolorRlabel: NO: NO: 11] 
			  packStart: fillcolorRspin: YES: YES: 0];
		fillcolorGbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: fillcolorGlabel: NO: NO: 11] 
			  packStart: fillcolorGspin: YES: YES: 0];
		fillcolorBbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: fillcolorBlabel: NO: NO: 11] 
			  packStart: fillcolorBspin: YES: YES: 0];
		fillcolorAbox = [[[[[[HBox alloc] init] homogeneous: NO] 
				spacing: 5] 
			  packStart: fillcolorAlabel: NO: NO: 11] 
			  packStart: fillcolorAspin: YES: YES: 0];
			
		[[[[[self
			packStart: fillcolorbox]
			packStart: fillcolorRbox]
			packStart: fillcolorGbox]
			packStart: fillcolorBbox]
			packStart: fillcolorAbox];
	}
}


-free {
	//[fillcolorcheckbutton free];
	[fillcolorlabel free];
	[fillcolorbox free];
	[fillcolorRlabel free];
	[fillcolorGlabel free];
	[fillcolorBlabel free];
	[fillcolorAlabel free];
	[fillcolorRspin free];
	[fillcolorGspin free];
	[fillcolorBspin free];
	[fillcolorAspin free];
	[fillcolorRbox free];
	[fillcolorGbox free];
	[fillcolorBbox free];
	[fillcolorAbox free];
	[minusFill free];
	
	return [super free];
}

@end